package cn.mw.cmdb.trigger;

import lombok.Getter;

@Getter
public enum MwNotifyScopeType {
    modelGroup(1, "模型组"), model(2, "模型"), instance(3, "实例");

    private final Integer code;

    private final String desc;

    MwNotifyScopeType(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static MwNotifyScopeType getByName(String name) {
        for (MwNotifyScopeType mwNotifyScopeType : MwNotifyScopeType.values()) {
            if (mwNotifyScopeType.name().equals(name)) {
                return mwNotifyScopeType;
            }
        }
        return null; // 或者返回一个默认值
    }
}
